const router = require('koa-router')()
const UserController = require('../controller/users')


router.prefix('/api')
// 获取参数的方式

// router.post('/add', UserController.add)
// router.delete('/delete', UserController.delete)
// router.delete('/batchDelete', UserController.batchDelete)
// router.put('/update', UserController.update)
// router.get('/page', UserController.page)
// router.get('/search', UserController.search)


router.delete('/user/:ids', async (ctx, next) => {
  let { ids } = ctx.params;
  // exec(`delete from blogs where id in (${ids.split('-').join(',')})`)
  ctx.body = {
    data: ids
  }
})


module.exports = router
